package com.example.websocket.service.impl;

import com.example.websocket.model.ChatMessage;
import com.example.websocket.service.MessageService;
import org.springframework.stereotype.Service;

import java.util.List;

// 使用 MongoDB 实现消息存储
@Service
public class MessageServiceImpl implements MessageService {

    @Override
    public void saveMessage(ChatMessage chatMessage) {

    }

    @Override
    public void deleteMessage(String messageId, String currentUserId) {

    }

    @Override
    public void editMessage(String messageId, ChatMessage updatedMessage, String currentUserId) {

    }

    @Override
    public void revokeMessage(String messageId, String currentUserId) {

    }

    @Override
    public List<ChatMessage> getPrivateChatHistory(String currentUserId, String targetUserId) {
        // 根据两个用户的ID组合查询私聊消息
        return List.of();
    }

    @Override
    public List<ChatMessage> getGroupChatHistory(String groupId) {
        // 根据群聊ID查询指定群聊的消息
        return List.of();
    }
}
